Skip to content

Conversation

@github-actions
Copy link

Description

Added some comments explaining the code.

Fixed the consonant printing.

Improved the message that is printed out.

Tested with the following strings:

abcdefghijklmnopqrstuvwxyz
Welcome to the Jungle 1234

Fixes issue

Fixes #2 python

Copy link
Owner

@CyberPro-beep CyberPro-beep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes added ‘y’ to the vowels string, even though ‘y’ is a consonant, not a vowel. Therefore, adding this change to the code would not produce the desired outcome. So remove the 'y' from the vowel string.

Copy link
Owner

@CyberPro-beep CyberPro-beep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First of all the line
num += text.lower().count(letter) is indented wrongly
Secondly, there's no need to print the consonants. Remove line print("consonant", letter)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

python: Exercise 1

3 participants